﻿@model InfoTech.VinhSon.Models.ConfigModel
@{
    ViewBag.Title = "Edit Configuration";
    ViewBag.MnuLevel1 = "system";
    ViewBag.MnuLevel2 = "configuration";
    Layout = "~/Areas/Administrator/Views/Shared/_Layout.cshtml";
}
@section navigation
{
    <ul class="breadcrumbs">
        <li><a href="@Url.Action("Index",
                                 "Dashboard")"><i class="iconfa-home"></i></a><span class="separator">
            </span></li>
        <li><a href="@Url.Action("Index")">Configuration</a><span class="separator"> </span>
        </li>
        <li>Edit Configuration</li>
    </ul>
}
@section header
{
    <div class="pageheader">
        <div class="pageicon">
            <span class="iconfa-briefcase"></span>
        </div>
        <div class="pagetitle">
            <h1>
                Edit Configuration</h1>
        </div>
    </div>
}
@Html.ValidationSummary()
<div class="widgetbox">
    <h4 class="widgettitle">
        Edit Article</h4>
    <div class="widgetcontent nopadding">
        <form class="stdform stdform2" enctype="multipart/form-data" method="POST">
        @Html.HiddenFor(c => c.Id)
        @Html.HiddenFor(c => c.IsUploadFile)
        <p>
            <label>
                Name</label>
            <span class="field">
                @Html.TextBoxFor(c => c.Name,
                                     new
                                         {
                                             @class = "input-xlarge",
                                             placeholder = "Name",
                                             @readonly = "readonly"
                                         })
                @Html.ValidationMessageFor(c => c.Name)
            </span>
        </p>
        @{
            if (Model.IsUploadFile)
            {
            <p>
                <label>
                    Thumbnail</label>
                <span class="field">
                    @{
                if (!string.IsNullOrEmpty(Model.Value))
                {
                        <img src="/Resource/Config/@Model.Value" width="200"/>
                        <br />
                }
                    }
                    <input name="upload" type="file" />
                </span>
            </p>
            }
            else
            {
            <p>
                <label>
                    Value</label>
                <span class="field">
                    @Html.TextAreaFor(c => c.Value,
                                     new
                                     {
                                         @class = "input-xlarge",
                                         placeholder = "Value",
                                     })
                    @Html.ValidationMessageFor(c => c.Value)
                </span>
            </p>
            }
        }
        <p class="stdformbutton">
            <label>
            </label>
            <input type="submit" value="Update" class="btn btn-primary" />
            <input type="reset" value="Cancel" class="btn" />
        </p>
        </form>
    </div>
</div>
